<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>NVTX C++ API Reference: nvtx3::v1::category Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">NVTX C++ API Reference<span id="projectnumber">&#160;1.0</span>
   </div>
   <div id="projectbrief">C++ convenience wrappers for NVTX v3 C API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>nvtx3</b></li><li class="navelem"><b>v1</b></li><li class="navelem"><a class="el" href="classnvtx3_1_1v1_1_1category.html">category</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classnvtx3_1_1v1_1_1category-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">nvtx3::v1::category Class Reference</div></div>
</div><!--header-->
<div class="contents">

<p>Object for intra-domain grouping of NVTX events.  
 <a href="classnvtx3_1_1v1_1_1category.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for nvtx3::v1::category:</div>
<div class="dyncontent">
<div class="center"><img src="classnvtx3_1_1v1_1_1category__inherit__graph.png" border="0" usemap="#anvtx3_1_1v1_1_1category_inherit__map" alt="Inheritance graph"/></div>
<map name="anvtx3_1_1v1_1_1category_inherit__map" id="anvtx3_1_1v1_1_1category_inherit__map">
<area shape="rect" title="Object for intra&#45;domain grouping of NVTX events." alt="" coords="31,5,179,31"/>
<area shape="rect" href="classnvtx3_1_1v1_1_1named__category__in.html" title="A category with an associated name string." alt="" coords="5,79,205,119"/>
<area shape="poly" title=" " alt="" coords="108,44,108,79,103,79,103,44"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a93b9c6f1e074a03ee50287c9c6414bc0" id="r_a93b9c6f1e074a03ee50287c9c6414bc0"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnvtx3_1_1v1_1_1category.html#a93b9c6f1e074a03ee50287c9c6414bc0">id_type</a> = uint32_t</td></tr>
<tr class="memdesc:a93b9c6f1e074a03ee50287c9c6414bc0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Type used for <code>category</code>s integer id.  <br /></td></tr>
<tr class="separator:a93b9c6f1e074a03ee50287c9c6414bc0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a16b26c66ef40850b7bf79fb8e8b9ccec" id="r_a16b26c66ef40850b7bf79fb8e8b9ccec"><td class="memItemLeft" align="right" valign="top">constexpr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnvtx3_1_1v1_1_1category.html#a16b26c66ef40850b7bf79fb8e8b9ccec">category</a> (<a class="el" href="classnvtx3_1_1v1_1_1category.html#a93b9c6f1e074a03ee50287c9c6414bc0">id_type</a> id) noexcept</td></tr>
<tr class="memdesc:a16b26c66ef40850b7bf79fb8e8b9ccec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a <code>category</code> with the specified <code>id</code>.  <br /></td></tr>
<tr class="separator:a16b26c66ef40850b7bf79fb8e8b9ccec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d59d395dff9e74ec8bd6154581fc345" id="r_a5d59d395dff9e74ec8bd6154581fc345"><td class="memItemLeft" align="right" valign="top">constexpr <a class="el" href="classnvtx3_1_1v1_1_1category.html#a93b9c6f1e074a03ee50287c9c6414bc0">id_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnvtx3_1_1v1_1_1category.html#a5d59d395dff9e74ec8bd6154581fc345">get_id</a> () const noexcept</td></tr>
<tr class="memdesc:a5d59d395dff9e74ec8bd6154581fc345"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the id of the category.  <br /></td></tr>
<tr class="separator:a5d59d395dff9e74ec8bd6154581fc345"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a11e030c15cf508cf5731b3e3d3368e" id="r_a2a11e030c15cf508cf5731b3e3d3368e"><td class="memItemLeft" align="right" valign="top"><a id="a2a11e030c15cf508cf5731b3e3d3368e" name="a2a11e030c15cf508cf5731b3e3d3368e"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>category</b> (<a class="el" href="classnvtx3_1_1v1_1_1category.html">category</a> const &amp;)=default</td></tr>
<tr class="separator:a2a11e030c15cf508cf5731b3e3d3368e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac38bb4042aa84b485e5d2ee1ee436927" id="r_ac38bb4042aa84b485e5d2ee1ee436927"><td class="memItemLeft" align="right" valign="top"><a id="ac38bb4042aa84b485e5d2ee1ee436927" name="ac38bb4042aa84b485e5d2ee1ee436927"></a>
<a class="el" href="classnvtx3_1_1v1_1_1category.html">category</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (<a class="el" href="classnvtx3_1_1v1_1_1category.html">category</a> const &amp;)=default</td></tr>
<tr class="separator:ac38bb4042aa84b485e5d2ee1ee436927"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e69ed0a6d1b2b839ce55f2344215627" id="r_a6e69ed0a6d1b2b839ce55f2344215627"><td class="memItemLeft" align="right" valign="top"><a id="a6e69ed0a6d1b2b839ce55f2344215627" name="a6e69ed0a6d1b2b839ce55f2344215627"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>category</b> (<a class="el" href="classnvtx3_1_1v1_1_1category.html">category</a> &amp;&amp;)=default</td></tr>
<tr class="separator:a6e69ed0a6d1b2b839ce55f2344215627"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9de5a026cbf16fecf46fedbaf8b34899" id="r_a9de5a026cbf16fecf46fedbaf8b34899"><td class="memItemLeft" align="right" valign="top"><a id="a9de5a026cbf16fecf46fedbaf8b34899" name="a9de5a026cbf16fecf46fedbaf8b34899"></a>
<a class="el" href="classnvtx3_1_1v1_1_1category.html">category</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (<a class="el" href="classnvtx3_1_1v1_1_1category.html">category</a> &amp;&amp;)=default</td></tr>
<tr class="separator:a9de5a026cbf16fecf46fedbaf8b34899"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Object for intra-domain grouping of NVTX events. </p>
<p>A <code>category</code> is simply an integer id that allows for fine-grain grouping of NVTX events. For example, one might use separate categories for IO, memory allocation, compute, etc.</p>
<p>Example: </p><div class="fragment"><div class="line"><a class="code hl_class" href="classnvtx3_1_1v1_1_1category.html">nvtx3::category</a> cat1{1};</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Range `r1` belongs to the category identified by the value `1`.</span></div>
<div class="line"><a class="code hl_typedef" href="nvtx3_8hpp.html#a8e124f3d438e512b586415f1ac2b9677">nvtx3::scoped_range</a> r1{cat1};</div>
<div class="line"> </div>
<div class="line"><span class="comment">// Range `r2` belongs to the same category as `r1`</span></div>
<div class="line">nvtx3::scoped_range r2{<a class="code hl_class" href="classnvtx3_1_1v1_1_1category.html">nvtx3::category</a>{1}};</div>
<div class="ttc" id="aclassnvtx3_1_1v1_1_1category_html"><div class="ttname"><a href="classnvtx3_1_1v1_1_1category.html">nvtx3::category</a></div><div class="ttdoc">Object for intra-domain grouping of NVTX events.</div><div class="ttdef"><b>Definition</b> <a href="nvtx3_8hpp_source.html#l01166">nvtx3.hpp:1166</a></div></div>
<div class="ttc" id="anvtx3_8hpp_html_a8e124f3d438e512b586415f1ac2b9677"><div class="ttname"><a href="nvtx3_8hpp.html#a8e124f3d438e512b586415f1ac2b9677">nvtx3::v1::scoped_range</a></div><div class="ttdeci">scoped_range_in&lt; domain::global &gt; scoped_range</div><div class="ttdoc">Alias for a scoped_range_in in the global NVTX domain.</div><div class="ttdef"><b>Definition</b> <a href="nvtx3_8hpp_source.html#l02187">nvtx3.hpp:2187</a></div></div>
</div><!-- fragment --><p>To associate a name string with a category id, see <code>named_category</code>. </p>

<p class="definition">Definition at line <a class="el" href="nvtx3_8hpp_source.html#l01166">1166</a> of file <a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="a93b9c6f1e074a03ee50287c9c6414bc0" name="a93b9c6f1e074a03ee50287c9c6414bc0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a93b9c6f1e074a03ee50287c9c6414bc0">&#9670;&#160;</a></span>id_type</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="classnvtx3_1_1v1_1_1category.html#a93b9c6f1e074a03ee50287c9c6414bc0">nvtx3::v1::category::id_type</a> =  uint32_t</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Type used for <code>category</code>s integer id. </p>

<p class="definition">Definition at line <a class="el" href="nvtx3_8hpp_source.html#l01169">1169</a> of file <a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a16b26c66ef40850b7bf79fb8e8b9ccec" name="a16b26c66ef40850b7bf79fb8e8b9ccec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a16b26c66ef40850b7bf79fb8e8b9ccec">&#9670;&#160;</a></span>category()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">constexpr nvtx3::v1::category::category </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classnvtx3_1_1v1_1_1category.html#a93b9c6f1e074a03ee50287c9c6414bc0">id_type</a>&#160;</td>
          <td class="paramname"><em>id</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">explicit</span><span class="mlabel">constexpr</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Construct a <code>category</code> with the specified <code>id</code>. </p>
<p>The <code>category</code> will be unnamed and identified only by its <code>id</code> value.</p>
<p>All <code>category</code>s in a domain sharing the same <code>id</code> are equivalent.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">id</td><td>The <code>category</code>'s identifying value </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="nvtx3_8hpp_source.html#l01180">1180</a> of file <a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a5d59d395dff9e74ec8bd6154581fc345" name="a5d59d395dff9e74ec8bd6154581fc345"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5d59d395dff9e74ec8bd6154581fc345">&#9670;&#160;</a></span>get_id()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">constexpr <a class="el" href="classnvtx3_1_1v1_1_1category.html#a93b9c6f1e074a03ee50287c9c6414bc0">id_type</a> nvtx3::v1::category::get_id </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">constexpr</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the id of the category. </p>

<p class="definition">Definition at line <a class="el" href="nvtx3_8hpp_source.html#l01186">1186</a> of file <a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>
